import request from '@/utils/request'

// 查询销售线索列表
export function listSource(query) {
  return request({
    url: '/crm/source/list',
    method: 'get',
    params: query
  })
}

// 查询销售线索详细
export function getSource(id) {
  return request({
    url: '/crm/source/' + id,
    method: 'get'
  })
}

// 新增销售线索
export function addSource(data) {
  return request({
    url: '/crm/source',
    method: 'post',
    data: data
  })
}

// 修改销售线索
export function updateSource(data) {
  return request({
    url: '/crm/source',
    method: 'put',
    data: data
  })
}

// 删除销售线索
export function delSource(id) {
  return request({
    url: '/crm/source/' + id,
    method: 'delete'
  })
}

// 删除销售线索
export function getCsCustomer(customerName) {
  return request({
    url: '/crm/cscuinfo/' + customerName,
    method: 'get'
  })
}

// 查询详细的跟进记录
export function getFollowRecord(customerName) {
  return request({
    url: '/crm/record/name/' + customerName,
    method: 'get'
  })
}
